import api from './index'

// 验证邀请链接
export function validateLink(code) {
  return api.get(`/resume/invitation/${code}`)
}

// 获取七牛云上传凭证
export function getUploadToken(type) {
  console.log('请求上传凭证，类型:', type)
  return api.get('/resume/upload-token', { 
    params: { type },
    headers: {
      'Cache-Control': 'no-cache'
    }
  })
}

// 提交简历
export function submitApplication(data) {
  return api.post('/resume/submit', data)
}

export default {
  validateLink,
  getUploadToken,
  submitApplication
} 